<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditJobsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditJobsLabel_JId}" for="JId" />
                    <h:inputText id="JId" value="#{jobsController.selected.JId}" title="#{bundle.EditJobsTitle_JId}" required="true" requiredMessage="#{bundle.EditJobsRequiredMessage_JId}"/>
                    <h:outputLabel value="#{bundle.EditJobsLabel_name}" for="name" />
                    <h:inputText id="name" value="#{jobsController.selected.name}" title="#{bundle.EditJobsTitle_name}" />
                    <h:outputLabel value="#{bundle.EditJobsLabel_description}" for="description" />
                    <h:inputTextarea rows="4" cols="30" id="description" value="#{jobsController.selected.description}" title="#{bundle.EditJobsTitle_description}" />
                    <h:outputLabel value="#{bundle.EditJobsLabel_requirements}" for="requirements" />
                    <h:inputTextarea rows="4" cols="30" id="requirements" value="#{jobsController.selected.requirements}" title="#{bundle.EditJobsTitle_requirements}" />
                    <h:outputLabel value="#{bundle.EditJobsLabel_deptName}" for="deptName" />
                    <h:selectOneMenu id="deptName" value="#{jobsController.selected.deptName}" title="#{bundle.EditJobsTitle_deptName}" >
                        <f:selectItems value="#{departmentsController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{jobsController.update}" value="#{bundle.EditJobsSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditJobsViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{jobsController.prepareList}" value="#{bundle.EditJobsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditJobsIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
